define(
		[ "PDAppDir/properties", "PDUtilDir/dataService", "PDAppDir/properties", "PDUtilDir/util",
			"PDUtilDir/inputSelect",
				"css!AppPathDir/spots/spotsTicketSearch/views/css/css" ],
		function(Properties, DataService, Properties, Util, inputSelect) {
			HomeApp.controller('BodyCtrl',["$scope", "$compile", '$sce', function($scope, $compile, $sce) {
				$scope.entity = DataService.getObject("spotsTicketOrder.detail" );
				$scope.cache = {
//					payTypes: DataService.getObject("dict.pay.type.list"),
//					payTypeMap: DataService.getMap("dict.pay.type.map"),
					payTypes: new Map(),
					payTypeMap: new Map(),
					htmls: new Array(),
					typeMap: DataService.getMap("DICT.D_SPOT_TICKET_TYPE.MAP"),
					tickets: new Array()
				};
				$scope.getDetailsFun = function(){
					$.ajax({
						url : getServer() + "/flea/hclv/ticket/order/item/selectOrderItemInfo.htmls",
						data : {
							orderId : $scope.entity.id
						},
						success : function(data) {
							if(data.status == 200){
								$scope.entity = $.extend($scope.entity, data.data);
								$scope.entity.payInfo.payPlatformName = $scope.cache.payTypeMap.get($scope.entity.payInfo.payPlatform)
								$scope.$digest();
							}
						}
					});
				}
				// 支付类型
				$.ajax({
					url : getServer() + "/flea/hclv/getPayType.htmls",
					success : function(data) {
						if(data.status == 200){
							$scope.cache.payTypes = data.data;
							data = data.data;
							$.each(data, function(index, row) {
								$scope.cache.payTypeMap.set(row.dictCode, row.dictName);
							});
//							DataService.setObject("dict.pay.type.list", data);
//							DataService.setMap("dict.pay.type.map", $scope.cache.payTypeMap);
						}
						$scope.getDetailsFun();
					}
				});
			}
	]);
});